Counting and Reporting Red/Blue Segment Intersections
نویسندگان
چکیده
We simplify the red/blue segment intersection algorithm of Chazelle et al: Given sets of n disjoint red and n disjoint blue segments, we count red/blue intersections in O(n log n) time using O(n) space or report them in additional time proportional to their number. Our algorithm uses a plane sweep to presort the segments; then it operates on a list of slabs that eeciently stores a single level of a segment tree. With no dynamic memory allocation, low pointer overhead, and mostly sequential memory reference, our algorithm performs well even with inadequate physical memory.
منابع مشابه
A Simple Trapezoid Sweep Algorithm for Reporting Red/Blue Segment Intersections
We present a new simple algorithm for computing all intersections between two collections of disjoint line segments. The algorithm runs in O(n log n + k) time and O(n) space, where n and k are the number of segments and intersections respectively. We also show that the algorithm can be extended to handle single-valued curve segments with the same time and space bound.
متن کاملFinding Intersections of Bichromatic Segments Defined by Points
Consider a set of n points in <, each colored either red or blue. A line segment defined by two red points is a red segment, and that defined by two blue points is a blue segment. A bichromatic intersection is an intersection between a red segment and a blue segment. We give an O(n + k) algorithm that reports k bichromatic intersections defined by the n points. Extending our algorithm to points...
متن کاملReporting Bichromatic Segment Intersections from Point Sets
In this paper, we introduce a natural variation of the problem of computing all bichromatic intersections between two sets of segments. Given two sets R and B of n points in the plane defining two sets of segments, say red and blue, we present an O(n) time and space algorithm for solving the problem of reporting the set of segments of each color intersected by segments of the other color. We al...
متن کاملCache-Oblivious Red-Blue Line Segment Intersection
We present an optimal cache-oblivious algorithm for finding all intersections between a set of non-intersecting red segments and a set of non-intersecting blue segments in the plane. Our algorithm uses O( B logM/B N B + T/B) memory transfers, where N is the total number of segments, M and B are the memory and block transfer sizes of any two consecutive levels of any multilevel memory hierarchy,...
متن کاملReporting Red - Blue Intersections BetweenTwo Sets Of Connected Line
We present a new line sweep algorithm, HeapSweep, for reporting bichromatic (`purple') intersections between a red and a blue family of line segments. If the union of the segments in each family is connected as a point set, HeapSweep reports all k purple intersections in time O((n + k)(n) log 3 n), where n is the total number of input segments and (n) is the familiar inverse Ackermann function....
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
دوره شماره
صفحات -
تاریخ انتشار 1993